// 控制公共组件
const state = {	
    companyId: localStorage.getItem("companyId") || null,
    companyName: localStorage.getItem("companyName") || null
};

const getters = {
};

const mutations = {
    setCompanyid(state, id) {
        localStorage.setItem("companyId", id)
        state.companyId = id     
    },
    setCompanyname(state, id) {
        localStorage.setItem("companyName", id)
        state.companyName = id     
    }
};

const actions = {
    setCompanyid(context) {
        context.commit('setCompanyid')           
    },
    setCompanyname(context) {
        context.commit('companyName')           
    }
};


export default {
    state,
    getters,
    mutations,
    actions
};